<template>
  
  <div class="zhuoweiitm">
      <el-button class="btn" type="success" @click="qdzhuowei(v.diningId)" v-for="(v,i) in text" :key="i">{{v.num}}</el-button>
  </div>
</template>

<script>

import {cxzhuowei} from "@/apis/yanwengang/yanwengang.js"
export default {
data(){
    return{
        text:[]
    }
},
methods:{
    
    qdzhuowei(diningId){
        console.log(diningId);
        this.$router.push({name:"quanbu",query:{zhuowei:diningId}});
        // this.$router.push("/diancan")
    }
},
mounted(){
    cxzhuowei().then((ok)=>{
        console.log(ok);
        this.text = ok.data.data
    })
}
}
</script>

<style scoped>

.zhuoweiitm{
 display: flex;
  flex-wrap: wrap;
justify-content: space-evenly;
 margin-top: 20px;
}
.zhuoweiitm .el-button--success{
 width: 100px;
 height: 100px;
 margin: 20px 50px 20px 50px;
 background-color: #ccc;
 border: 0;
}
</style>